home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / RTF / richtext_test.C < prev    next >
C/C++ Source or Header  |  1994-08-01  |  1KB  |  60 lines

  1. /* main.c
  2.  *
  3.  * Test driver for RichText widget.
  4.  * supports:
  5.  *  Wcl interface specification,
  6.  *  Editres protocol
  7.  *
  8.  * USE:
  9.  *  compile, link with libRichText.a
  10.  *  setenv XENVIRONMENT test.res
  11.  *  ./test
  12.  */
  13.  
  14.  
  15. #include <Xm/Xm.h>
  16. extern "C" void MriRegisterMotif(XtAppContext);
  17.  
  18. #include "X11/Wc/WcCreate.h"
  19.  
  20. #include "RichText.h"
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23.  
  24. extern void RegisterHelp (Widget, const char*);
  25.  
  26.      /* X11R5 only */
  27. extern "C" void _XEditResCheckMessages(Widget, XtPointer, XEvent *, Boolean *);
  28.  
  29. main(Cardinal argc, char *argv[])
  30. {
  31.   XtAppContext app;
  32.   Widget appShell;
  33.  
  34.   appShell = XtAppInitialize(&app, "RichTextTest",
  35.                  NULL, 0,
  36.                  &argc, argv, NULL,
  37.                  (ArgList)NULL, 0);
  38.   
  39.   
  40.   MriRegisterMotif ( app );
  41.  
  42.   WcRegisterClassName(app, "XcRichText", xcRichTextWidgetClass);
  43.  
  44.   WcWidgetCreation ( appShell );
  45.  
  46.   XtAddEventHandler(appShell,
  47.             (EventMask) 0,
  48.             TRUE,
  49.             _XEditResCheckMessages,
  50.             NULL);
  51.  
  52.   XtRealizeWidget ( appShell );
  53.   XtAppMainLoop ( app );
  54.   
  55.   return 0;
  56. }
  57.  
  58.  
  59.  
  60.